<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    // 定义一个数组
    var arr = [45,56,76,88,89,90,100,34,56];
    // 数组遍历
    // for (var i = 0 ; i <= arr.length - 1 ;i++) {
    //   console.log(arr[i]);
    // }
    for(var i=0; i<arr.length; i++){
      console.log(arr[i])
    }

    // 给数组中每一项数据加 5
    for (var i = 0; i < arr.length ; i++) {
      // 获取每一项数组的数据，等号赋新值
      arr[i] += 5;
    }
    console.log(arr);
  </script>
</head>
<body>
  
</body>
</html>